package com.example.final_project.mapper;

import com.example.final_project.entity.Publisher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface PublisherMapper {
    // 新增出版社
    int insert(Publisher publisher);
    
    // 更新出版社
    int update(Publisher publisher);
    
    // 删除出版社
    int deleteById(Long id);
    
    // 根据ID查询出版社
    Publisher selectById(Long id);
    
    // 查询出版社列表
    List<Publisher> selectList(@Param("name") String name);

    int countAllPublishers();

    List<Publisher> selectLatestPublishers(int limit);

    List<Publisher> getLatestPublishers(@Param("limit") int limit);
} 